package chamber.zero;

import chamber.n00.helloworld.Command;
import chamber.zero.guice.ChamberZeroModule;
import com.google.inject.Guice;
import com.google.inject.Inject;
import com.google.inject.Injector;
import common.Program;

/**
 * Created by Gerardo on 11/27/13.
 */
public class TestChamberZero implements Program {
    private final Command command;

    @Inject
    public TestChamberZero(final Command command) {
        this.command = command;
    }

    public static void main(final String[] args) {
        ChamberZeroModule zeroModule = new ChamberZeroModule();
        Class<TestChamberZero> type = TestChamberZero.class;

        Injector injector = Guice.createInjector(zeroModule);
        Program program = injector.getInstance(type);
        program.execute();
    }

    @Override
    public void execute() {
        command.execute();
    }
}
